import request, {
    Method, buyerUrl,managerUrl
} from '@/plugins/request.js'
/**
 *  获取plus开通类型列表 
 * 
 */
export const plusList = () => {
    return request({
        url: buyerUrl + "/buyer/goods/goods/plusList",
        method: Method.GET,
        needToken: true,
    })
}
/**
 * plus会员购买下单
 * 
 */
export const payPlus = (data) => {
    return request({
        url: buyerUrl + "/buyer/order/order/userPlusOrder",
        method: Method.POST,
        needToken: true,
        headers: {
            "Content-Type": "application/json"
        },
        data,
    })
}
/**
 *   获取plus隐私协议
 */
export const plusPrivacy=()=>{
    return request({
        url: managerUrl+ "/manager/other/article/type/PLUS_POLICY",
        method: Method.GET,
        needToken: true,
    })
}
/**
 * 结算页面  积分抵现
 */
export const useIntegral=(params)=>{
    return request({
        url: buyerUrl+ "/buyer/trade/carts/select/point",
        method: Method.GET,
        needToken: true,
        params
    })
}